<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
  var p=  new Promise((resolve,reject)=>{
       
        setTimeout(()=>{
            
            reject(888888)

        },5000)
    })
    p.then((res)=>{
        console.log("promise状态变为finished成功",res);

    }).catch((err)=>{
        console.log("状态变为失败",err);
    }).finally(()=>{
        console.log("promise对象的状态（结束）");
    })
</script>
</html>